// 联合类型
type IId = string | number;
const id: IId = "123";
//  元组
// type IArr = string[];
// let arr1: IArr = ["1", "1", 1, false];
// type IArr = [string, boolean, number];
// let arr2: IArr = [123, false, 1];

// 枚举

// enum IApi {
//   spuList = "/spu/lit",
//   spuListInfo = "/spu/lit/info",
// }

// export const getSpuListApi = () => {
//   return request.get(IApi.spuList);
// };
// export const getSpuListInfoApi = () => {
//   return request.get(IApi.spuListInfo);
// };
// ts的重载
function fn(x: string): string;
function fn(x: number): number;
function fn(x: string | number): string | number {
  return x;
}

fn(1);
